<template>
    <div>
        <el-form-item v-for="(item, index) in data" :key="index" :label="item.name">
            <div v-if="item.type == 'input'">
                <el-input v-model="item.value" class="input" :placeholder="item.placeholder"></el-input>
            </div>
            <div v-if="item.type == 'radio'">
                <el-radio-group v-model="item.value" size="large">
                    <div class="radiobutton" v-for="(list, li) in item.radioList" :key="li">
                        <el-radio-button :label="list" />
                    </div>
                </el-radio-group>
            </div>
            <el-button class="button" type="primary" plain v-if="item.btn">{{ item.btn }}</el-button>
            <div class="formItemsspan" v-if="item.isLinefeed">{{ item.tip }}</div>
            <span class="formItemsspan" v-else>{{ item.tip }}</span>
        </el-form-item>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();
interface Props {
    data?: any;
}
const props = withDefaults(defineProps<Props>(), {
    data: [],
});
console.log(props.data, 121212);
</script>
<style lang="scss" scoped>
.input {
    margin-right: 10px;
    width: 505px;
}
.formItemsspan {
    font-size: 12px;
    font-weight: 400;
    color: #999999;
}
.button {
    margin-right: 10px;
}
</style>
